import os
from datetime import datetime, timedelta, timezone


f=open('numbers.txt', encoding='utf-8')
#此时只读取了一行
pre = f.readline()

parts = pre.split(",")
parts = [int(item) for item in parts if item != '']
min_num = min(parts)
max_num = max(parts)
parts.remove(min_num)
parts.remove(max_num)
avg_num = sum(parts) / len(parts)
print(f"----min_num: {min_num}")
print(f"----max_num: {max_num}")
print(f"----avg_num: {avg_num}")